﻿<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> 
    <head>
        <title></title>
        <link rel="stylesheet" href="css/reset.css" />
        <link rel="stylesheet" href="css/layout.css" />
        <link rel="stylesheet" href="css/box.css" />
        <link rel="stylesheet" href="css/tree.css" />
        <link rel="stylesheet" href="css/pagination.css" />
        <link rel="stylesheet" href="css/style.css" />
        <script type="text/javascript" src="http://cb.alimama.cn/kissy/1.2/kissy-min.js"></script>
        <script type="text/javascript" src="js/auth.js"></script>
        <script type="text/javascript" src="js/tip.js"></script>
        <script charset="utf-8" src="http://cb.alimama.cn/med/dialog/1.0/dialog.js"></script>
        <script charset="utf-8" src="http://cb.alimama.cn/med/validator/1.0/auth.js"></script>
        <script charset="utf-8" src="http://cb.alimama.cn/med/validator/1.0/validator.js"></script>
    </head>
    <body>
        <div id="content" class="personal account">
            <div class="layout grid-m">
                <div class="col-main">
                    <div class="med-list-tab" id="tab1">
                        <ul>
                            <li><a class="icon iperson" href="#">个人信息</a></li>
                            <li class="current"><a class="icon iaccount" href="alipay.jsp">支付中心</a></li>
                        </ul>
                    </div>

                    <div class="med-table med-list-d ks-hidden" id="list1">
                        <div class="med-l">
                            <ul class="layout med-list-tab2" id="menu1">
                                <li class="current"><a href="#">基本信息</a></li>
                            </ul>
                            <div class="med-tabbox" id="med-tab">
                                <div class="med-tab med-tab1">
                                    <form method="post" name="update-form"  action="user" id="update-form">
                                        <input name="action" type="hidden" value="update">
                                        <ul class="field">
                                            <li>
                                                <span class="label">用户昵称:</span>
                                                <label for="logname" id="lognamelabel"></label>
                                                <input type="text" id="nickname" title="邮箱" name="nickname" class="text" data-auth="{
                                                       label:'昵称不可更改，请谨慎填写',
                                                       length:[1,32,true,'昵称长度为1到32个字符，且为必填项']
                                                       }"  value=${user.nickname} >
                                            </li>
                                            <li>
                                                <span class="label">手机号码:</span>
                                                <label for="logname" id="lognamelabel"></label>
                                                <input type="text" id="phone" data-auth="{
                                                       label:'手机号码是爱词账户等重要问题和您保持联系的首选，请认真填写',
                                                       mobile:['手机号码输入有误']
                                                       }" title="手机号" name="phone" class="text" value=${user.phone}>
                                            </li>
                                            <li>
                                                <span class="label">新密码:</span>
                                                <label for="logname" id="lognamelabel"></label>
                                                <input type="password"    data-auth="{
                                                       label:'密码由5-32个字符组成',
                                                       length:[5,32,true,'密码长度为5到32个字符，且为必填项']
                                                       }" class="text s18" id="password" name="password">
                                            </li>
                                            <li>
                                                <span class="label">确认新密码:</span>
                                                <label for="logname" id="lognamelabel"></label>
                                                <input type="password"   data-auth="{
                                                       label:'请再输入一遍您上面输入的密码',
                                                       equalTo:['#password','两次输入密码不一致']
                                                       }"  class="text s18" id="passwords" name="passwords">
                                            </li>
                                            <li>
                                                <button type="button" class="button save-btn" id="update-btn" ></button>
                                                <span id="J_result"></span>
                                            </li>
                                        </ul>
                                    </form>
                                </div>

                            </div>
                        </div>
                    </div>
                    <div class="med-table med-list-s" id="list2">
                        <div class="bar bar1">
                            <p>当前账户名称：<span>${user.nickname}</span>&nbsp;&nbsp;&nbsp;&nbsp;</p>
                        </div>
                        <!-- {{{ table -->
                        <table class="account_table">
                            <tr class="title">
                                <th>日期</th>
                                <th>类型</th>
                                <th>金额（元）</th>
                                <th>支付宝交易号</th>
                            </tr>






                            <c:forEach items="${accounts}" var="u" varStatus="s">
                                <tr class="hlight">
                                    <td class="date">

    
                                        <fmt:formatDate value="${u.createtime}" pattern="yyyy-MM-dd HH:mm:ss"/> 
                                    </td>
                                    <td class="black">

                                        <c:if test="${u.status==0}" var="result">
                                            付款中
                                        </c:if>
                                        <c:if test="${u.status==1}" var="result">
                                            付款成功
                                        </c:if>



                                    </td>
                                    <td class="red">
                                        <c:out value="${u.accountamt / 100.0}" />
                                    </td>
                                    <td class="green" >
                                        <c:out value="${u.alipayNumber / 100.0}" />
                                    </td>
                                </tr>
                            </c:forEach>




                        </table>


                    </div>
                </div>
            </div>
        </div>

        <div id="footer">    
            <div class="layout grid-m">
                <div class="col-main">
                    <div class="rights">© Copyright 2010~2011, All Rights Reverved.Supported By BanRuoLang.</div>
                </div>
            </div>
        </div>
        <script type="text/javascript" src="js/common.js"></script>
        <script>
            (function(){
                var S = KISSY, DOM = S.DOM, Event = S.Event,
                queryString = function(sParam){
                    var re = new RegExp("[&|?]" + sParam + "=([^&]*)");
                    return re.test(window.location.search)? RegExp.$1 : null;
                },
                tip = queryString("t"),
                mods = [
                    //初始化表单验证
                    function(){
                        var formsmg= S.one("#J_result"),
                        check = new S.Auth('#update-form',{
                            warn: tip
                        });
                        Event.on('#update-btn','click',function(){
                            if(check.isValid()){
                                document.forms[0].submit();
                            }
                        });
                    },
				 
                ];
                if(/^v-/.test(tip)){
                    cls = tip;
                    tip = 'text';
                }

                KISSY.ready(function(S) {
                    S.each(mods, function(mod) {
                        S.isFunction(mod) && mod.call();
                    });
                });
		
            })();
        </script>
    </body>
</html>